﻿using System;

namespace SharpStockLib.Fin
{
    /// <summary>
    /// Facility class to factor some code for children.
    /// </summary>
    public abstract class InstrumentBase : IInstrument
    {
        private string _symbol;


        public string Symbol
        {
            get { return _symbol; }

            // We always want to use upper case for symbols
            set { _symbol = value == null ? null : value.ToUpper(); }
        }

        public override string ToString()
        {
            return Symbol;
        }

        public Market Market
        {
            get;
            set;
        }

        public string Description
        {
            get;
            set;
        }

        public virtual DateTime SessionOpen
        {
            get;
            set;
        }

        public virtual DateTime SessionClose
        {
            get;
            set;
        }

        public virtual DateTime OutcryOpen
        {
            get;
            set;
        }

        public virtual DateTime OutcryClose
        {
            get;
            set;
        }

        public virtual DateTime TradableOpen
        {
            get;
            set;
        }

        public virtual DateTime TradableClose
        {
            get;
            set;
        }
    }
}
